class TwitterData < ActiveRecord::Base
  belongs_to :twitter_crawl, :foreign_key => :crawl_id # foreign key - crawl_id
  
  def crawl
    twitter_crawl
  end
  
  def crawl=(new_crawl)
    twitter_crawl = new_crawl
  end
  
  @@trusts = {
     "first_name" => 0.9,
     "full_location" => 0.8,
     "full_name" => 0.95,
     "last_name" => 0.9,
     "locale_language" => 0.99
  }
  
  def trust_of(field)
    raise Exception.new "#{self.class} must define trust for #{field}" if !@@trusts.key? field
    @@trusts[field]
  end
end
